Restore position, when replacing in file