Add modules to file in reliable order

to solve occasional test failure.

Any order makes as much sense as no order.