sort history file with modification time