     (clog/disable-logging!)
     (set-inspecting-on!)
     (let [pstore (pstore/elasticsearch-path-store es-url options)
-          sort (get-sort-or-dummy-fn (:sort options))]
-      (->> (tree-walker tenant paths pstore options empty-paths-remover)
-           (sort)
-           (map println)
-           (dorun)))
-    (catch Exception e
-      (clog/unhandled-error e))))
+          sort (get-sort-or-dummy-fn (:sort options))
+          empty-paths (->> (tree-walker tenant paths pstore options
+                                        empty-paths-remover)
+                           (sort))]
+      (newline)
+      (dorun (map println empty-paths)))
+    (catch Exception e
+      (clog/unhandled-error e))))

  (let [removed-paths (atom [])]
    (reify TreeProcessor
      (tp-get-title [this]
        "Searching empty paths")
      (tp-get-paths [this]
        (get-paths pstore tenant paths (:exclude-paths options) false
                   (partial add-path-to-tree tree-impl)))

         "[:bar] :percent :done/:total Elapsed :elapseds ETA :etas")
        (prog/config-progress-bar! :width pbar-width)
        (newline)
        (clog/info (str title (if @inspecting? "..." ":")))
        (when-not @clog/print-log?
          (println title)
          (prog/init paths-count))
        (walk [])
        (when-not @clog/print-log?
          (prog/done))
        (let [empty-paths (tp-get-data processor)]
          (clog/info (str "Found " (count empty-paths) " empty paths"))
          empty-paths)
        (finally
          (tp-show-stats processor))))))

