better to set the allow_mismacth here like
```
mt=modules_tool_class(mod_paths=mod_paths)
mt.allow_mismatch = buildoptions.get('allow_mismatch',False)
```
and set ```self.allow_mismatch=False``` in the ```__init__```.