Added environment variable validation