began to make the OpenFile generic with enum to read and write