make sync() callback optional
remove unused persistent option
avoid multiple callback calls in sync()