Added checks for Elf file not to be bigger than max