Group output for one iteration

This aims to avoid incoherent output because of multithreading.