core: Fix stats collecting and access logging