Setup storing of System state on shutdown