When printing valid hosts sort by key