fix bugs of using logging message