Made a more explicit error message and exception
Merge branch 'feature/make-config-more-robust' into dev