Only log api access when debug enabled
Separated kill processing and stat generation