increase stability, mdebug toplevel module code.

still not possible to mdebug inside module functions.