sort files for index