Better error handling when loading config.