Make debug configurable via environment variable