relocate the config file check