Better error handling in config loader