fix bug (std::ofstream is marked delete)