handling ?corrupt? .fit files?

I'm using the latest release of the SwiftSDK and I'm getting a fault from my .fit files when trying to read... 

 

My code is as simple as it gets right now: 

func ingestFitFile(_ data: Data) throws {

    let start = Date()


    let stream = FITSwiftSDK.InputStream(data: data)

    let decoder = Decoder(stream: stream)

    try verifyFitFile(decoder: decoder)


    let fitListerner = FitListener()

    decoder.addMesgListener(fitListerner)

    do{

        try decoder.read()

    } catch{

        logger.verbose("\(error)")

    }

The fault is:

unexpectedly found nil while unwrapping an optional value

and is coming from:

public init(stream: InputStream) throws {

        let recordHeader: UInt8 = try stream.readNumeric();

        localMesgNum = LocalMesgNum(rawValue: recordHeader & FIT.LOCAL_MESG_NUM_MASK)!

        reserved = try stream.readNumeric()

        let architecture: UInt8 = try stream.readNumeric()

        endianness = Endianness(rawValue: architecture)!

I'm definitely new to using this SDK... but struggling to find a way to at least ignore whatever is causing this so I can move past it... and again it's not throwing an error it's faulting. 

Any help moving me in the right direction would be appreciated... I've looked through the SDK and have tried to scan the forum for a solution... just not finding it right now.  

Cheers,

K