Changed the reception code so that even if packets are recieved out of order data is logged correctly