                           :type (file-type e)
                           :size (file-size e)}))))))
 
-(defn list-remote-files [path]
+(defn list-remote-files
   "Get the list of all files at the given path"
+  [path]
   (let [this-channel (ssh/ssh-sftp (session))]
     (ssh/with-channel-connection this-channel
-      (when (not (nil? path))
+      (when-not (nil? path)
         (ssh/sftp this-channel {} :cd path))
       (ssh/sftp this-channel {} :ls))))
 

      (reset! ssh-agent agent)))
  @ssh-agent)

(defn- session []
  "Get the currently active session, if one doesn't exist, create a new one and make sure the
  session is connected"

                                           :username user
                                           :strict-host-key-checking :no})]
      (info "New session created with param: " host user port)
      (reset! ssh-session session)
      (ssh/connect session)))
  ;; seems to me the ssh/connected? seems to return true and then the channel creation fails with "Session not connected"
  ;; Explictely call connect every time the session is requested.
  (reset-session-invalidate)
  @ssh-session)

(defn all-files [path]
