Added I2C error handling.