added sync write & read prefs
added sync write & read prefs