print only in one thread