                    (go (>! channel latest)))
                  (if @keep-watching? 
                    (do 
-                     (println "Waiting" wait "ms until next 'watch'")
+                     (debug-do (println "Waiting" wait "ms until next 'watch'"))
                      (Thread/sleep wait)
                      (recur latest))))))]
      {:channel channel 
       :stop (fn []
-              (println "Closing channel" channel "and trying to end future" f)
+              (debug-do (println "Closing channel" channel "and trying to end future" f))
               (reset! keep-watching? false)
               (close! channel))})))
 

  :wait - milliseconds to wait between watch calls."
  ([client document-ids]
   (watch-documents client document-ids (chan)))
  ([client document-ids channel options]
   (watch client (fn []
                   (load-documents client document-ids)) channel options)))

               (= attempt max-attempts))
         result
         (do
           (debug-do (println "Index" (:index query) "is stale, waiting" wait "ms before trying again."))
           (Thread/sleep wait)
           (recur (get-result) (inc attempt))))))))

