Added mean value printout to each iteration.