       else
         atom.notifications?.addError errorMessage
 
-  ## UPDATE
   update: (props, callback) ->
     return false if not props._id
 

    @fileWatcher.close() if @fileWatcher?
    @fileWatcher = fs.watch @file(), (event, filename) =>
      @emitter.emit 'db-updated'
      # Send update event

  updateFile: ->
    fs.exists @file(true), (exists) =>

      if key is id
        delete(projects[key])

    CSON.writeFileSync @file(), projects

  onUpdate: (callback) ->
    @emitter.on 'db-updated', () =>
