Added sorting to file paging