 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)

    catch e
      console.warn e
    finally
      if cleanup
        fs.unlink(file)

sendHeartbeat = (file, lineno, isWrite) ->
  time = Date.now()

    )
  )

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