       "ComputerName" (.. InetAddress getLocalHost getHostName)
       "Depth" (core getBytesPerPixel)
       "Directory" (if (:save settings) (settings :root) "")
-      "Frames" (:numFrames settings)
+      "Frames" (count (:frames settings))
       "GridColumn" 0
       "GridRow" 0
       "Height" (core getImageHeight)

                         (or (:autofocus event)
                             (when-let [t (:wait-time-ms event)]
                               (pos? t))))]
    (filter identity ;; removes nil events
      (flatten
        (list
          #(log event)

(defn random-error [prob]
  (when (< (rand) prob)
    (throw (Exception. "Simulated error"))))

;; globals

