Issue #1: Added a check for environment variables