Added support for the -m option out the output job.
Fixed the unit tests.