    load: (callback) ->
     IPC.on 'userDataPath', (e, path) =>
      @_userDataPath = path
-     #TODO load options, temporary
-     @content = Help
+     try
+      options = "#{FS.readFileSync PATH.join @_userDataPath, OPTIONS_FILE}"
+      @options = JSON.parse options
+     catch e
+      @options =
+       file: ''
+       folder: ''
+     @setFolder()
+     @setFile()
+     if @file?
+      try
+       @content = "#{FS.readFileSync @file.path}"
+      catch e
+       @content = '=====Error reading file====='
+     else
+      @content = null
+
+     try
+      @_tempContent = "#{FS.readFileSync PATH.join @_userDataPath, TEMPORARY_FILE}"
+     catch e
+      if @content?
+       @_tempContent = @content
+      else
+       @_tempContent = @content = Help
      callback()
     IPC.send 'getUserDataPath'
 


  TEMPORARY_FILE = 'temporary.swp.ds'
  OPTIONS_FILE = 'options.json'
  TEMPORARY_SAVE_INTERVAL = 30 * 1000
  CHANGED_WATCH_INTERVAL = 500

  PROTOCOLS = [

    else
     @elems.saveName.textContent = "#{@file.name}"

   setFolder: ->
    @folder = null
    folder = @options.folder
    return if folder is ''
    url = folder.split PATH.sep
    url.shift() while url.length > 0 and url[0] is ''
    return if not url.length > 1
    url = ['file://'].concat folder.split PATH.sep
    url = url.slice 0, url.length - 1
    @folder =
     path: folder
     url: url.join '/'

   setFile: ->
    @file = null
    file = @options.file
    return if file is ''
    @file =
     name: PATH.basename file, '.ds'
     path: file



  APP = new App()
