Run time components can't be saved to text files. Represent the contents and structure in JSON text, and save that text.