Add common method check_cfg