better error reporting for curl download command