fixed NullPointerException on SFTP upload