Changed function bWriteLog