Eliminating source of hard to reproduce bug with printf