Some code to check for valid elf files