fix file copy for sftp