added check_env
added check_env