Add history file support