change printf to use buffer directly

We are not create tstring any more when printf string,
otherwise tsting hash table will crash in while looping printing.