Use simple function to write prefs to file, remove call state observer when being dealloc'd