Parser for log files and some cleanup of logging writeouts