Updated to use single FileIO func