save temp only if changed