Handle invalid JSON config

Fixes #178 
name change to parseAndValidate