 
 (defn- process-output
   "Writes the records to the next output file and resets the record buffer"
-  [{:keys [verbose
-           records
+  [{:keys [records
            output-folder
            file-name
            output-paths

      true)))

(defn- filter-record
  ([xf]
   (let [filter-state (atom {})]
     (fn
       ([] (xf))

                              output-folder
                              file-name
                              (count output-paths))]
      (>!! progress-chan [:message "compressing and writing records..."])
      (binding [*print-meta* true]
        (with-open [writer (io/writer (GZIPOutputStream. (FileOutputStream. output-path)))]
          (with-precision 4
            (.write writer (prn-str records)))))
      (>!! progress-chan [:message output-path])
      (-> context
          (assoc :records [])
          (update-in [:output-paths] #(conj % output-path))))
    context))

(def ^:private chunk-file-options
  [["-m" "--maximum MAXIMUM" "The maximum number of records to include in each output file"
    :parse-fn #(Integer/parseInt %)
    :default 1000]])

