   []
   (let [threads-listing (str core/disqus-jobs-dir "all.threads")
         downloaded-listing (if (.exists
-                                (io/as-file "all.downloaded"))
+                                (io/as-file (str core/disqus-jobs-dir "all.downloaded")))
                             (set
                              (string/split-lines
-                              (slurp "all.downloaded")))
+                              (slurp (str core/disqus-jobs-dir "all.downloaded"))))
                             (set []))
         thread-stream (with-open [rdr (io/reader threads-listing)]
                         (doall

(defn download-posts
  "Download all the posts for a single thread"
  [thread-id file-to-write api-key]
  (let [url (create-url thread-id
                        api-key)
        first-page-content (core/rate-limited-download url)]
    (write-content file-to-write first-page-content)
    (discover-iteration thread-id file-to-write first-page-content api-key)))

                     (io/as-file file-to-write)))
          
          ;; kick off download
          (let [thread-ids
                (partition
                 300
                 (string/split-lines
                  (slurp thread-ids-file)))]
            (do (doseq [thread-id thread-ids]
                  (download-posts thread-id
                                  file-to-write
