Add time logging.
Fix crash when incoming rdlength > MAX_PACKET_LEN.