If we raise the ConfigError here we can remove the try-except block and decrease complexity a bit.