Fixed curl error reporting