Tweaked modwrapper to be a bit more robust. It will now cope with module syntax errors and complete code corruption!