Add processing to create the stats JSON file