changes file first list

changes file first list
add conditional order by for output method