[PULL 23/27] util: fix interleaving of error & trace output