Added a size limit for the history file. (default: 1000)