     else if !@rootDir()?
       findFiles()
     return true
-    
+
   findDependentFiles: (file) ->
     content = fs.readFileSync file, 'utf-8'
     baseDir = path.dirname(@latex.mainFile)

    findFiles = () =>
        @latex.texFiles = [ @latex.mainFile ]
        @latex.bibFiles = []
        @findDependentFiles(@latex.mainFile)    
    if @disable_watcher or @watchRoot()
      findFiles()
      if @disable_watcher

    for ext in extnames
      if path.basename(fpath).endsWith(ext)
        return [path.basename(fpath).replace(ext,''), ext.slice(1)]

  findMain: (here) ->
    result = @findMainSequence(here)
    if result and !fs.existsSync(@latex.mainFile)
