cleanup of mcu, implement poweroff on error