Record history in JSON files