Fixed typo in exception message
Improved exception message
Improved testing of reading a packet from a socket