RegisterMod() fix

- Debugging messages in MCM script.
- Fixed logic error in RegisterMod().