Log all packets
Various bug fixes