increment iteration count even on errors