Use doc.FileName rather than doc.Editor.FileName in three more places.