Don't delete config if it is malformed
Perhaps don't just overwrite the config file if it is malformed. Lost my whole server info because of this....
Really frustrating :(

I know the feeling.  Now when I am editing the ServerInfo through my ftp I don't close it out until it's done and complete without error.  Saves lots of frustration.

You can also just copy all the text and paste into a json formatter like this

https://jsonformatter.curiousconcept.com/

Yeah, I was editing with notepad++ and I was stupid enough to click yes when it asked if it should reload the file, even though I already saw the error in the console.