How to fix typical mistakes in a parsing of log files