Fixed some bugs in output reporting and multi-threading class.

There is a problem in the secondry job assignment function that needs to be resolved