Save history file into cache directory