adding log when connection fails.