sync on flush