Improve cURL error reporting