Fix exception handling for config reader