check history file exists before trying to read it