                                           (if err err "Something went wrong downloading"))))
       (try
         (with-open [in (io/input-stream file)]
-          (let [_ (log/info "Processing file:" (first (:changeLogs request)))
+          (let [_ (log/info "Processing file:" (:changeLog request))
                 result (core/update-extracts dataset extract-types in)
                 run-stats (merge request result)]
             (swap! stats assoc-in [:processing worker-id] nil)

  (let [dataset (:dataset request)
        extract-types (:extractTypes request)
        zipped? (if (nil? (:format request)) true (= (:format request) "zip"))
        [file err] (download-file (first (:changeLogs request)) zipped?)]
    (if-not file
      (do
        (swap! stats assoc-in [:processing worker-id] nil)

(def ExtractRequest
  "A schema for a JSON extract request"
  {:dataset                   s/Str
   :changeLog                 URI
   (s/optional-key :format)   (s/enum "csv" "zip")
   :extractTypes              [s/Str]
   (s/optional-key :callback) URI})
