Text this: A method of consistent state recovery in switching system