process directories' files in a deterministic order