Making test output obey debug flags