save before change ctrl+c handler