If you don't have to 'touch' the file until it hasn't been completed, then an approach could be to ask the remote server also to put the MD5 sum of the file *ONLY* after the transfer is completed.
Let's suppose the file is called 'file' and the md5 sum is 'file.md5'
if [ -x file.md5 ]
--> first check if the sum is correct,
--> then perform the other operations
You didn't say how you transfer that file.
Anyway, another option would be to transfer the file with a different name and then rename it when the transfer is complete. As said by Marco, use checksums to verify the file was correctly transferred.