       (.setText label (apply label-html message-parts))
       (.show frame))
     (when temporary?
-    (future (Thread/sleep 3000)
-            (edt (.hide frame))))))
+      (future (Thread/sleep 3000)
+              (edt (.hide frame))))))
+
+(defmacro pausing-live-mode
+  "Temporarily stop live mode (if it is running), run body code, and then
+   start live mode again (if it was running)."
+  [& body]
+  `(let [live-mode# (.isLiveModeOn gui)]
+    (when live-mode#
+      (.enableLiveMode gui false))
+    ~@body
+    (when live-mode#
+      (.enableLiveMode gui true))))
+
+(defn new-dll-name
+  [dll]
+  (let [name (.getName dll)]
+    (if (JavaUtils/isWindows)
+      name
+      (.replace name ".la" ""))))
 
 (defn reload-updated-module
   "Unload a module, copy the new version to the Micro-Manager

(defn module-for-dll
  "Finds the module name for a dll path."
  [dll]
  (-> dll
      file .getName (.split "\\.")
      first (.replace "mmgr_dal_" "")))

(defonce 
  status-frame

    (future
      (while @keep-following
        (Thread/sleep 500)
        (when-not (.isAcquisitionRunning gui)
          (reset! date-atom (file-dates path)))))
    #(reset! keep-following false)))
      
(defn watch-dates
