Added logging of number of operations