fix error in logger. catch bad log messages. #424