Rearrange files in proper order