save state on quit, load with -S flag