parsefile method to mmap and parse whole file