Enclose debug printfs in #ifdef DEBUG statements.