Tweaks to the history file management.