error if the config file is invalid

This stops surprising the developer when their config file is ignored due to a typo.
switched from error to die
Merge pull request #2042 from maxpow4h/patch-1

error if the config file is invalid