Added checks for power on and boot functions so they are not executed twice