 extractCLI = (zipFile, callback) ->
   console.log 'Extracting wakatime-master.zip file...'
   if fs.existsSync(__dirname + path.sep + 'wakatime-master')
-    rimraf(__dirname + path.sep + 'wakatime-master', ->
-      unzip(zipFile, __dirname, true)
-      console.log 'Finished installing wakatime cli.'
-      if callback?
-        callback()
-    )
+    try
+      rimraf(__dirname + path.sep + 'wakatime-master', ->
+        unzip(zipFile, __dirname, callback)
+      )
+    catch e
+      console.warn e
+      unzip(zipFile, __dirname, callback)
   else
-    unzip(zipFile, __dirname, true)
-    console.log 'Finished installing wakatime cli.'
-    if callback?
-      callback()
+    unzip(zipFile, __dirname, callback)
 
 downloadFile = (url, outputFile, callback) ->
   r = request(url)

    )
  )

unzip = (file, outputDir, cleanup) ->
  if fs.existsSync(file)
    zip = new AdmZip(file)
    try

    window.VERSION = atom.packages.getLoadedPackage('wakatime').metadata.version

    if not isCLIInstalled()
      installCLI(->
        console.log 'Finished installing wakatime cli.'
      )
    else
      isCLILatest((latest) ->
        if not latest
          installCLI(->
            console.log 'Finished installing wakatime cli.'
          )
      )
    isPythonInstalled((installed) ->
      if not installed
