Update for saving state and recovering after interruptions