Output files in sorted order