 
 (defn burst-cleanup []
   (log "burst-cleanup")
-  (when (core isBufferOverflowed)
-    (throw-exception "Circular buffer overflowed."))
   (core stopSequenceAcquisition)
   (while (and (not (@state :stop)) (. mmc isSequenceRunning))
     (Thread/sleep 5)))

    (select-keys event [:position-index :frame-index
                        :slice-index :channel-index])
    (when out-queue
      (.put out-queue
            (make-TaggedImage (annotate-image image event @state (elapsed-time @state)))))
    image))


                             (when-let [t (:wait-time-ms event)]
                               (< 1000 t))))]
    (filter identity
            ; The items of the flattened list get executed without stopping or
            ; pausing in between (except when throwing)
            (flatten
              (list
                #(log "#####" "BEGIN acquisition event:" event)
