adding config check in read_config.