added try catch around I2C statements