Added a config_check method and fix a indent issue