move DEBUG setting to environment variable