Added error handling, i2c plug and play working