When expanding remember templates, do file insertion first