Ordering output per file decreasing frequency