fixed parsing of log messages to be more correct between different possibilities