After enabling stacking on a standalone switch, the primary.cfg file gets re-saved as old_non_stack.cfg because the pre-stacking configuration is no longer compatible. Other files (scripts, etc.) should remain unchanged. When the stacking-enabled switch is stacked with another switch, whichever switch becomes master will sync its files to the other slots. Any other existing files on those slots will be erased. If stacking is then disabled on the slot, any files synced from the master will remain on the switch and the primary.cfg file from the stack will be renamed to old_stack.cfg.