Prevent history file from growing forever.