Save cursor position when saving files