error handling for the sftp pieces