I think the string format error is when you have too many placeholders, not enough parameters.
I understand the problem now.
I think what you are seeing is a delayed effect. The message in chat will only appear once it is removed from the screen. That happens (in this case) after you have already printed the next message which pushes the previously into the "log".
I'm just guessing though.