Replace getenv with