modified the FileIO class