Added class FileManager to handle input/output of files.