 		catch let error as NSError {
 			NSApplication.shared.presentError(error)
 		}
-
-		dirty = false
+	}
+
+	func resetSaveTimer() {
+
+		saveTimer?.rs_invalidateIfValid()
+
+		saveTimer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: false) { (timer) in
+			self.saveToDiskIfNeeded()
+		}
+	}
+
+	func removeSaveTimer() {
+
+		saveTimer?.rs_invalidateIfValid()
+		saveTimer = nil
 	}
 }
 

	private var dirty = false {
		didSet {
			if dirty {
				saveTimer?.rs_invalidateIfValid()
				saveTimer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: false) { (timer) in
					self.saveToDiskIfNeeded()
					timer.rs_invalidateIfValid()
					self.saveTimer = nil
				}
			}
			else if !dirty {
				saveTimer?.rs_invalidateIfValid()
				saveTimer = nil
			}
		}
	}

		return d as NSDictionary
	}

	func saveToDiskIfNeeded() {

		if !dirty {
			return
		}

		if refreshInProgress {
			resetSaveTimer()
			return
		}

		saveToDisk()
		dirty = false
	}

	func saveToDisk() {

		let d = diskDictionary()
