The final outputs such as "-summary.json" are hard to read. We might experiment with YAML serialization to reduce punctuation. If possible, it would be helpful to order all maps by descending count so that the most important entries are at the top.
Code to review: