Improve Error Handling with invalid config

Implement Error Handling when an invalid config is parsed.