save before commit