Created a Filecontrol class to facilitate read and write operation on a file