Fixed error handling in config class