adjusted is_open condition
adjusted is_open condition
made use of virtual functions and written a process file function.