add some write failure protection
implement LED & Buzzer