Catch mmap errors correctly