More error printouts for sockets... verbose, but it helps debugging
More informative printouts and cleaner termination
More error checking on ReadAvailable/WriteAvailable