outfile.structure is given with lots of site properties that are usually just a list of None - this raises a bunch of warnings when manipulating the structure (ie substructure = Structure.from_sites([site for site in structure])).
If a site property is None for all sites, the site property should be popped by default