Stopping the device on an error.