Adding iteration count to output.