sFTP uploads empty file

While editing a file and saving it, sometimes (perhaps 10% chance) sFTP Editor uploads an empty file. After adding a space to the file and saving it again it often works, but in some cases I have to save a file more than 5 times in a row to get it propperly uploaded.

(editing a php file with “Open with” - Sublime Text)