Change fstream class to be like std c++ fstream