Updated to use download.file with curl method instead of the RCurl package