wrote a script that extracts the categories into a txt file