timestamp and message length were reversed in the headers. added pretty printing of logfiles and fixed missing packet header