better error handling when NI device fails