break out logging from iteration