add cplusplus ofstream handle