Fixed bugs in synchronous logging