dump ever 5 iterations if iter larger than 5