   (let [image-queue (LinkedBlockingQueue. 1)]
     (future (single-thread-pop-test num-images image-queue))
     (let [queue (LinkedBlockingQueue. 1)]
-      (future (dotimes [_ num-images]
+      (future (dotimes [i num-images]
                 (let [img (.take image-queue)
                       n (count img)]
                   (.put queue
                         (image-to-byte-buffer
                           img
-                          (byte-buffer (* n 2)))))))
+                          (byte-buffer (* n 2))))
+                  )))
       queue)))
 
 (defmacro dotimes-timed [bindings interval & body]

     (println '~(first bindings) "time (ms)")
     (dotimes ~bindings
       (when (zero? (mod ~(first bindings) ~interval))
         (println ~(first bindings) (- (System/currentTimeMillis) t0#)))
       ~@body)))

(defn acquire-and-save
  "Simulate running a sequence acquisition, and save the
   images to a file using the direct byte buffer method."
  [num-images]
    (let [filename (str "E:/acquisition/test" (rand-int 100000) ".dat")
          file (RandomAccessFile. filename "rw")
          channel (.getChannel file)]
      (try

  [num-images image-queue]
  (run-sequence-acquisition num-images false)
  (dotimes [i num-images]
    (when-let [image (pop-next-image)]
      (when image-queue
        (.put image-queue image)))))

(defn byte-buffer-queue
  "Run a sequence acquisition, convert the incoming
