throw errors if env vars are missing