add fstream-like file class