Save settings immediately when switch changed

This way the value is preserved if the user closes the app
while on the settings page.
Modify the config file to use a standard name
Make non-existing file read safe, to give proper error messages