Use ostringstream to build up error strings