 
   watchRoot: ->
     root = @rootDir()
+    return false if !root?
     if !@rootWatcher? or @prevWatcherClosed(@rootWatcher,root)
       @latex.logger.log.push {
         type: status

    if event is 'add'
      @latex.provider.subFiles.getFileItems(fpath)
    else if event is 'unlink'
      @latex.provider.subFiles. resetFileItems(fpath) 
      @latex.provider.reference.resetRefItems(fpath)
    if @isTexFile(fpath)
      # Push command and references suggestions

      return @config?
    @lastCfgTime = Date.now()
    rootDir = @rootDir()
    return false if !rootDir?
    if '.latexcfg' in fs.readdirSync rootDir
      try
        filePath = path.join rootDir, '.latexcfg'
        fileContent = fs.readFileSync filePath, 'utf-8'
        @config = JSON.parse fileContent
        if @config.root?
          @config.root = path.resolve rootDir, @config.root
        return true
      catch err
        console.log err
    return false

  isTexFile: (name) ->
