core: Fix stats collection and access logging