Using diff match to avoid replace whole file will go back to top