make debug dependent on environment variable