Code changes, factory method for files, add sftp connection