add history file and new history doc format