                            file-path-separator
                            topo-id
                            file-path-separator
-                           port))
-           files (filter (comp not nil?)
-                         (for [f (.listFiles dir)]
-                           (let [name (.getName f)]
-                             (if (or
-                                  (.endsWith name ".txt")
-                                  (.endsWith name ".jfr")
-                                  (.endsWith name ".bin"))
-                               (.getName f)))))]
+                           port))]
        (if (.exists dir)
          (if (or (blank? (*STORM-CONF* UI-FILTER))
-               (authorized-log-user? user "worker.log" *STORM-CONF*))
+               (authorized-log-user? user 
+                                     (str topo-id file-path-separator port file-path-separator "worker.log")
+                                     *STORM-CONF*))
            (html4
              [:head
               [:title "File Dumps - Storm Log Viewer"]

      :headers {"Access-Control-Allow-Origin" origin
                "Access-Control-Allow-Credentials" "true"})))

(defroutes log-routes
  (GET "/log" [:as req & m]
    (try

              (include-css "/css/style.css")]
             [:body
              [:ul
               (for [file (get-profiler-dump-files dir)]
                 [:li
                  [:a {:href (str "/dumps/" topo-id "/" host-port "/" file)} file ]])]])
           (unauthorized-user-html user))
