Iteration callbacks, iteration stopping, and error handling