#14 corrected print to console for socket and code bug errors