Added a simple string stream for printing.
Added assertion that we never write too long format strings.