use env variables to decide debug mode