changed file opening for history.txt to auto-create