Write to tmp folder when testing history write