[DF-5222] Added saving of flags.txt during save with children