          setTimeout =>
           @loadSavedContent =>
            @_loading = false
-          , 300
-        , 500
-       , 500
+          , 0
+        , 0
+       , 0
 
    loadRetainedDirectory: (callback) ->
     chrome.storage.local.get 'directory', (directory) =>
      directory = directory?.directory
-     if directory?
-      chrome.fileSystem.isRestorable directory, (isRestorable) =>
-       if isRestorable
-        chrome.fileSystem.restoreEntry directory, (d) =>
-         if d? and d.isDirectory
-          @on.openDirectory d
-         callback()
-       else
-        callback()
-     else
-      callback()
+     return callback() if not directory?
+     chrome.fileSystem.isRestorable directory, (isRestorable) =>
+      return callback() if not isRestorable
+      chrome.fileSystem.restoreEntry directory, (d) =>
+       @on.openDirectory d, callback
 
    loadRetainedFile: (callback) ->
     chrome.storage.local.get 'file', (file) =>
      file = file?.file
-     if file?
-      chrome.fileSystem.isRestorable file, (isRestorable) =>
-       if isRestorable
-        console.info "Restoring #{file}"
-        chrome.fileSystem.restoreEntry file, (d) =>
-         if d? and d.isFile
-          @on.openFile d, callback
-       else
-        callback()
-     else
-      callback()
+     return callback if not file?
+     chrome.fileSystem.isRestorable file, (isRestorable) =>
+      return callback() if not isRestorable
+      chrome.fileSystem.restoreEntry file, (d) =>
+       @on.openFile d, callback
 
    saveContent: (value, callback) ->
     return if @_loading


    setTimeout reentrant, 100

   @listen 'openDirectory', (entry) ->
    return unless entry?

    chrome.storage.local.set
     directory: chrome.fileSystem.retainEntry entry

    @loadDirEntry entry

   @listen 'file', (e) ->
    chrome.fileSystem.chooseEntry

   @listen 'openFile', (entry, callback) ->
    console.log 'openFile', new Date
    return unless entry?
    return if not entry.isFile

    chrome.storage.local.set
     file: chrome.fileSystem.retainEntry entry
