added try/except blocks to AP_IMU.py