The expression stuff outside and inside the loop could be merged. (and the errors ignored before the last iteration)