Custom code for bootloader