changed debug setting to env variable