add support for execution with the -m switch, fixed issue #398