Add exception handling to settings