In order to make layouts more reproducible
Also add pattern.sort() and file.utils.preflight_check()
optionally don't sort elements
elements aren't re-ordered that often, sorting them is slow, and the
sort criteria are arbitrary, so we might want to only sort stuff by name