           done()
           return
 
-        loadPreferencesAtPath = (path, done) ->
-          fsUtils.readObjectAsync path, (error, preferences) =>
+        loadPreferencesAtPath = (preferencePath, done) ->
+          fsUtils.readObjectAsync preferencePath, (error, preferences) =>
             if error?
-              console.warn("Failed to parse preference at path '#{path}'", error.stack, error)
+              console.warn("Failed to parse preference at path '#{preferencePath}'", error.stack, error)
             else
               preferenceObjects.push(preferences)
             done()

        selector = syntax.cssSelectorFromScopeSelector(grammar.scopeName)
        @scopedProperties.push({selector, properties})

    for path in fsUtils.list(@getPreferencesPath())
      {scope, settings} = fsUtils.readObject(path)
      if properties = @propertiesFromTextMateSettings(settings)
        selector = syntax.cssSelectorFromScopeSelector(scope) if scope?
        @scopedProperties.push({selector, properties})

      else
        done()

  loadGrammarAtPath: (grammarPath, done) =>
    TextMateGrammar.load grammarPath, (err, grammar) =>
      return console.log("Error loading grammar at path '#{grammarPath}':", err.stack ? err) if err
      @addGrammar(grammar)
      done()

  loadGrammarsSync: ->
    for grammarPath in fsUtils.list(@getSyntaxesPath(), @legalGrammarExtensions)
      @addGrammar(TextMateGrammar.loadSync(grammarPath))

  addGrammar: (grammar) ->
    @grammars.push(grammar)
