got file IO working