still working on write (for extending a current file)