I would not recommend to output anything on other nodes than the master node, as - depending on the platform that you are using - the slave nodes may not be able to handle output. Therefore, although it is nasty, you will have to collect all information to be printed out to the master node.