Simplifies creating the char*, avoids using useless std::string

MD-20923