Fixed problem with ssh and sftp where a new file was being created each time it was run