handle error when opening settings file