Sort files by time, also smarter limiting