[ ] Do this for directories. [ ] Store last offset so we can flush only first part of the file