Curl error handling for windows