 
 (defn snap-image [open-before close-after]
   (with-core-setting [getAutoShutter setAutoShutter false]
-    (when open-before
-      (core setShutterOpen true)
-      (wait-for-device (core getShutterDevice)))
-    (core snapImage)
-    (when close-after
-      (core setShutterOpen false))
-      (wait-for-device (core getShutterDevice))))
+    (let [shutter (core getShutterDevice)]
+      (device-best-effort shutter
+        (when open-before
+          (core setShutterOpen true)
+          (wait-for-device (core getShutterDevice))))
+      (device-best-effort (core getCameraDevice)
+        (core snapImage))
+      (device-best-effort shutter
+        (when close-after
+          (core setShutterOpen false))
+          (wait-for-device (core getShutterDevice))))))
 
 (defn init-burst [length]
   (core setAutoShutter (@state :init-auto-shutter))

      (doall (map (partial await-for 10000) (vals device-agents))))
    (do
      (doseq [[dev action] action-map]
        (device-best-effort dev action)))))

(defn run-autofocus []
  (.. gui getAutofocusManager getDevice fullFocus)

    (when-let [exposure (:exposure event)]
      (list [(core getCameraDevice) #(core setExposure exposure)]))))

(defn run-actions [action-map]
  (if run-devices-parallel
    (do
