Use std::string stream rather than FS string functions / streams