           installAtomShell(atomShellVersion)
           rebuildNativeModules(currentAtomShellVersion, done)
         else
-          downloadAtomShell atomShellVersion, (error, zipPath) ->
+          downloadAtomShellOfVersion atomShellVersion, (error, zipPath) ->
             if zipPath?
               unzipAtomShell zipPath, (error) ->
                 if error?

  isAtomShellVersionCached = (version) ->
    grunt.file.isFile(getCachePath(version), 'version')

  downloadAtomShell = (version, callback) ->
    options =
      url: "https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/#{version}/atom-shell-#{version}-darwin.zip"
      proxy: process.env.http_proxy || process.env.https_proxy

    inputStream = request(options)
    inputStream.on 'response', (response) ->
      if response.statusCode is 200
        grunt.log.writeln("Downloading atom-shell version #{version.cyan}")
        cacheDirectory = getCachePath(version)
        rm(cacheDirectory)

        else
          grunt.log.error("atom-shell #{version.cyan} request failed")
        callback(false)

  downloadAtomShellOfVersion = (version, callback) ->
    findReleaseIdFromAtomShellVersion version, (error, releaseId) ->
      if error?
        callback(error)
      else
        getAtomShellDownloadUrl version, releaseId, (error, url) ->
          if error?
            callback(error)
          else
            downloadAtomShell version, url, callback

  unzipAtomShell = (zipPath, callback) ->
    grunt.log.writeln('Unzipping atom-shell')
