More improvements to error handling in config class.