add logger and resolve the socket timeout issue.