fixed some bugs in the shutdown sequence. Log4j not initialized error at the end of a benchmark fixed.