updating history file