     (.addToAlbum gui (make-TaggedImage img))))
 
 
-(defn run-acquisition-with-processors [this settings acq-eng]
+(defn run-acquisition-with-processors [this settings acq-eng cleanup?]
   (def last-acq this)
   (def eng acq-eng)
   (swap! (.state this) assoc :stop false :pause false :finished false)
   (let [out-queue (LinkedBlockingQueue. 10)]
     (reset! (.state this) nil)
     (def outq out-queue)
-    (let [acq-thread (Thread. #(run-acquisition this settings out-queue)
+    (let [acq-thread (Thread. #(run-acquisition this settings out-queue cleanup?)
                               "Acquisition Engine Thread (Clojure)")
           processors (ProcessorStack. out-queue (.getTaggedImageProcessors acq-eng))
           out-queue-2 (.begin processors)]

    (event-fn)
    (await-resume)))

(defn run-acquisition [this settings out-queue]
  (try
    (def acq-settings settings)
    (log (str "Starting MD Acquisition: " settings))

      (let [acq-seq (generate-acq-sequence settings @attached-runnables)]
        (def acq-sequence acq-seq)
        (execute (mapcat #(make-event-fns % out-queue) acq-seq))
        (when cleanup?
          (cleanup))
        (.put out-queue TaggedImageQueue/POISON)
        ))
    (catch Throwable t (do (ReportingUtils/showError t "Acquisition failed.")
