Added check to only output the lines that are not filtered out in the output class.