Modified the way that files are sorted