state save before re-write