Added curlError method