Add safe memento creation to temp file before rename to Inventory class.