moved logging after hitcount