made GPTask check enviroment variables before failing on a fork