Added required env variable and error handling