datesort: allow more than 1000 pics, close f asap