[elf2efi] Improve error handling