BUG: when mmap_mode is None