Refactor out verify_config method.