Use temp dir also on custom history file