create and write to settings file