    [nil "--projection PROJ" "RD / ETRS89 / SOURCE"]
    ["-r" "--replay [N/root-collection]" "Replay last N events or all events from root-collection tree from persistence to projectors"]
    [nil "--clear-timeline-changelog" "Clear timeline changelog for dataset"]
+   [nil "--single-processor" "One processor for all files, reads meta data of first file only."]
    ["-h" "--help"]
    ["-v" "--version"]])
 

  java.io.Closeable
    (close [this] (close-fn)))

(defn features-from-files [files & args]
  (when (seq files)
    (let [f (first files)
          fs (clojure.java.io/reader f)]
      (log/info "Processing " f)
      (concat (CloseableSeq. (apply features-from-stream f args) #(.close fs))
              (lazy-seq (apply features-from-files (rest files) args))))))

        processor (processor/create meta dataset persistence projectors)]
    processor))

(defn process-features [features options]
  (log/info "Start processing")
  (let [processor (setup-processor options)]
    (dorun (consume processor features))
    (do (log/info "Shutting down.")
        (shutdown processor)))
  (log/info "Done processing"))

(defn process [{:keys [json-files dataset single-processor] :as options}]
  (if single-processor
    (let [[meta features] (features-from-files json-files :dataset dataset)]
      (process-features features (merge meta options)))
    (doseq [file json-files]
      (let [[meta features] (features-from-files [file] :dataset dataset)]
        (process-features features (merge meta options))))))

  (defn int? [^java.lang.String s]
  (try
    (Integer/parseInt s)
    true
