Split config into a separate file and add sanity check and test

Chasing #1246 

/cc @philips @unihorn @xiangli-cmu 
why does the check only happens when ClusterStateValueNew?