file IO working. required functions stubbed in