better logic for setting DEBUG