Fix curl errors

I've found that it silently fails when errors occur using CurlSession and commandline.