Added logEveryIteration option for the network