putStr in the same thread