 
   loadGrammars: (done) ->
     fsUtils.isDirectoryAsync @syntaxesPath, (isDirectory) =>
-      return unless isDirectory
+      return done() unless isDirectory
 
-      fsUtils.listAsync @syntaxesPath, @legalGrammarExtensions, (err, paths) =>
-        return console.log("Error loading grammars of TextMate package '#{@path}':", err.stack, err) if err
+      fsUtils.listAsync @syntaxesPath, @legalGrammarExtensions, (error, paths) =>
+        if error?
+          console.log("Error loading grammars of TextMate package '#{@path}':", error.stack, error)
+          done()
+          return
+
         async.waterfall [
             (next) =>
               async.eachSeries paths, @loadGrammarAtPath, next

      done()

  loadGrammarsSync: ->
    for path in fsUtils.list(@syntaxesPath, @legalGrammarExtensions) ? []
      @addGrammar(TextMateGrammar.loadSync(path))

  addGrammar: (grammar) ->

  load: ({sync}={}) ->
    if sync
      @loadGrammarsSync()
      @loadScopedPropertiesSync()
    else
      TextMatePackage.getLoadQueue().push(this)

