I ran into a similar situation when I was trying to save the config file directly with the web interface based file editor.
Also got the same when I tried to replace the file manually on the file system with another one, uploaded with SFTP.
It looks like there's a process "watching" this file when it's being modified from outside, and instead accepting the modifications, it deletes it and it tries to restore something from a backup.
The problem is, that:
if the backup doesn't contain a valid file, the result will be an empty file
the user doesn't have a chance to override this behaviour. It may be very well that somebody wants to do this on purpose, and fighting against the system is not something pleasant to do.