More efficient generation of mod files