mmap is working, write still not appending