fixed error handling in writeSettings

error handling was too eager and hid all errors, causing #49 to go
unnoticed