sftp close in case of exception.