Major update to auto-insert of new file head/foot