my @files = map { "$self->{update_dir}/$_" } sort { $a <=> $b } grep { /^\d+$/ && $_ <= $id } readdir $dir;