How to fix typical mistakes when parsing log files