If computer is suddenly shut off have a temp file that is auto saved so that be used at next restart to ask if user wants previous state restored.