restore cursor position when open file