fix bugs in LogManager.cpp