Filtering obsolete classes and printing them to file