Finished extracting file IO from UI