wrap file io to std::string