script to check categories for a given PID, write out to a csv file containing detailed info