use mmap to open file in worker thread