sync before commit