added an error handling code. It builds well, but I don't have the device. So please review it (and test if you have one) if you think I can improve something, please tell me. I'll send v2. Thanks, Hyeonggon