   (check-specs!))
 
 (defn go []
+  (alter-var-root #'flow/adapter (fn [f]
+                                   (fn [{:keys [version rows-cols instance survey-id form-id]} data]
+                                     (doall (map (fn [d]
+                                                   (let [file-name (format "./dev/resources/%s/%s-%s-%s.edn" dev-flow-datasets-dir (format "%s-%s-%s" instance survey-id form-id) (name rows-cols) version)]
+                                                     (spit file-name data :append true)
+                                                     d)) data))
+                                     (f nil data))))
   (commons/config)
   (ir/go))
 

  (:import [org.postgresql.util PSQLException PGobject]
           [java.time Instant]))

(defn check-specs! []
  (log/warn "instrumenting specs!")
  (stest/instrument))

(defn read-edn-filename
  "file should live in resources"
  [filename]
  (let [x (->> (format "%s/%s" dev-flow-datasets-dir filename)
               (clojure.java.io/resource)
               (clojure.java.io/file)
               (slurp))]
