         ]
     (comp
      (boot/with-pre-wrap [fileset]
-       (let [webapp-edn-files (->> (boot/fileset-diff @prev-pre fileset)
-                                   boot/input-files
-                                   (boot/by-name [webapp-edn]))
-             webapp-edn-f (condp = (count webapp-edn-files)
-                            0 nil
-                            1 (first webapp-edn-files)
-                            (throw (Exception. "only one webapp.edn file allowed")))
-             webapp-edn-map (if webapp-edn-f (-> (boot/tmp-file webapp-edn-f) slurp read-string) {})
+       (let [
+             ;; webapp-edn-files (->> (boot/fileset-diff @prev-pre fileset)
+             ;;                       boot/input-files
+             ;;                       (boot/by-name [webapp-edn]))
+             ;; webapp-edn-f (condp = (count webapp-edn-files)
+             ;;                0 nil
+             ;;                1 (first webapp-edn-files)
+             ;;                (throw (Exception. "only one webapp.edn file allowed")))
+             ;; webapp-edn-map (if webapp-edn-f (-> (boot/tmp-file webapp-edn-f) slurp read-string) {})
              boot-config-edn-files (->> (boot/fileset-diff @prev-pre fileset)
                                     boot/input-files
                                     (boot/by-re [(re-pattern (str boot-config-edn "$"))]))
                                     ;; (boot/by-name [boot-config-edn]))
              boot-config-edn-f (condp = (count boot-config-edn-files)
                              0 (do (util/info (str "Creating " boot-config-edn "\n"))
-                                   nil)
-                             1 (first boot-config-edn-files)
+                                   (io/file boot-config-edn)) ;; this creates a java.io.File
+                             1 (first boot-config-edn-files)  ;; this is a boot.tmpdir.TmpFile
                              (throw (Exception.
-                                     (str "only one _boot_config.edn file allowed, found " (count boot-config-edn-files)))))
-             boot-config-edn-map (if boot-config-edn-f
-                                 (-> (boot/tmp-file boot-config-edn-f) slurp read-string)
-                                 {})
-             boot-config-edn-map (merge boot-config-edn-map webapp-edn-map)]
-         ;; (println "boot-config-edn-map: " boot-config-edn-map)
+                                     (str "only one _boot_config.edn file allowed, found "
+                                          (count boot-config-edn-files)))))
+             boot-config-edn-map (if (instance? boot.tmpdir.TmpFile boot-config-edn-f)
+                                   (-> (boot/tmp-file boot-config-edn-f) slurp read-string)
+                                   {})
+             ;; boot-config-edn-map (merge boot-config-edn-map webapp-edn-map)
+             ]
+         (println "boot-config-edn-map: " boot-config-edn-map)
 
          (if (:reloader boot-config-edn-map)
            fileset
            (do
-             ;; step 1: inject :reloader stanza into _boot_config.edn
              ;; (add-reloader! reloader-impl-ns urls in-file out-file)
+             ;; step 1: create config map for reloader, inject into master config file
              (let [urls (flatten (concat (map #(% :urls) (:servlets boot-config-edn-map))))
                    m (-> boot-config-edn-map (assoc-in [:reloader]
                                                  {:ns reloader-impl-ns

               (util/info "Configuring reloader\n")
               (reset! prev-pre
                       (-> fileset
                           (boot/add-source edn-tmp)
                           (boot/add-source aot-tmp-dir)
                           (boot/add-asset impl-tmp-dir)
                           boot/commit!)))))))

     )))

(boot/deftask build
  "Configure and build servlet or service app"
  [k keep bool "keep intermediate .clj and .edn files"
   p prod bool "production build, without reloader"
   s service bool "build a service"
