Sort output entries