Close mmap before closing file