Beginning of serialization of model to save objects when crashing