Added exception handling for failed barcode decoding