Update the history file