Minor updates to config parsing
Add checks for the validity of the config params