Stringstream to ostringstream tidy up