Creates checkEnv and implements