Code clean up + updated error message

- Cleaned up unnecessary spaces, replaced tabs with spaces and fixed line
terminators.

- Changed message from "conecting" to "error" as in this case
communication is over and was an error.