added writeConfig method for changing settings