Updated code to print when packet successfully received