fix unchecked array index in ParseLogLine() and add basic tests