Add bootloader specific code, need to fix bootloader detection code as well