Solved slow logging problem