read & write information on shutdown