Added logic for packetLoss and split send packet