save file position when saving a document