Don't print traceback in case of a socket error
Move imports to the top