I have gotten this bug many times but I cannot reproduce it on command because it occures when there is an ftp timeout. What happens is that the ftp times out and the ftp dialog hangs for awhile. After timeout you hit save again and a dialog says: Cannot create file "C:\...\Temp\wbftp.tmp" The process cannot access the file because it is being used by another process. The code you have is still visable at this point. You exit/restart the app. open your ftp file -- and the file is empty!
This has happened to me many times as ftp timeout are frequent; however, the file should not get trashed.