Added array sort for the file array