Added statistics logging