write to several json files based on first char of package names