Rewrote the log parser to fix some consistency bugs

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>