added logging of packets