Check for data before outputting a new file; add a class to the ul