Implement the saving of results during computation to avoid loss of data in case of unexpected event.