Move reporting and control code outside the loop callback block

This triggers a LocalJumpError in jruby