created a class for file Input and Output