     (cp/with-shutdown! [tpool (get-thread-pool options)]
       (let [pstore (pstore/elasticsearch-path-store es-url options)
             sort (get-sort-or-dummy-fn (:sort options))
-            empty-paths (->> (tree-walker tenant paths pstore options
-                                          empty-paths-finder tpool)
-                             (sort))]
+            empty-paths (sort (tree-walker tenant paths pstore options
+                                           empty-paths-finder tpool))]
         (newline)
         (dorun (map println empty-paths))))
     (catch Exception e

      (cp/with-shutdown! [tpool (get-thread-pool options)]
        (let [pstore (pstore/elasticsearch-path-store es-url options)
              sort (get-sort-or-dummy-fn (:sort options))
              empty-paths (->> (tree-walker tenant paths pstore options
                                            empty-paths-finder tpool)
                               (sort))]
          (process-paths tenant empty-paths pstore options
                         remove-empty-paths-processor tpool))))
    (catch Exception e

                        "rollup: " rollup ", "
                        "period: " period)))
      (let [data (mstore/fetch mstore tenant rollup period path from nil 1)]
        (when (and (not= data :mstore-error) (not (seq data)))
          (log/debug (str "Metrics on path '" path "' are obsolete"))
          [path rollup-def])))
    (catch Exception e
      (clog/error (str "Metric obsolescence checking error: " e ", "
                       "path: " path ", "
