added several fixes, can now handle older logs etc.