better error logging when connection fails