     file = {url:params.url, asText:true}
     #console.log(file)
     filepicker.read(file, (data) -> 
-      #console.log(data)
       self.result[params['filename']] = data
       lines = data.split('\n')
       if params.filename is 'todo.txt'
         self.todos = new TodoList(lines)
-      if params.filename is 'done.txt'
+      else if params.filename is 'done.txt'
         self.done = new TodoList(lines)
     )
+    return
 
   prepareFile: () ->
     @todos.list.join("\n")

      @output("TODO: #{i} of #{@todos.list.length} tasks shown<br/>")

  initFiles: () ->
    @downloadFile({filename:'todo.txt', url:@todoURL})
    @downloadFile({filename:'done.txt', url:@doneURL})


          self.todoURL = item.url
          db.get('done.txt', (item) ->
            self.doneURL = item.url
            self.initFiles()
          )
      )
    )
    @output("Welcome to todo.txt Chrome Edition<br/>")
