moved FileIO to controller