Properly flush the contents of the mmap file
Small optimization