fix error handling in config module