Added basic sanity checking to the elf parser