added errorhandler for accelerometer