Saving scan statistics
Fix: Using uint64 instead of int to store statistics counters