Now print connection errors properly.

I added a few print statements for when something goes wrong
during initialization of the socket to the manager.
I also now free the address info structure that we allocate
when resolving the IP address that was passed to us via cmd line.