tweaked: added check for magic number, quit prior to mmap if not supported