added a check for valid elf files