Added assertion that we never write too long format strings.