   []
   (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)))

                             (get "cursor")
                             (get "next"))
            
            next-pg-url (create-url-2 thread-id
                                      api-key
                                      cursor-value)
            
            next-pg-content (core/rate-limited-download next-pg-url)]
        (write-content filename-to-write
