Added function to get a packet from file