Changed curl command to download to temp file