         
         // create a timer to handle reading from the trace input filehandle
         // if speed parameter exists
-        if speed != nil {
-          let spdf:Double = Double(speed!) / 1000.0
+        if let speed = speedOrNil {
+          let spdf:Double = Double(speed) / 1000.0
           traceFilesourceTimer = Timer.scheduledTimer(timeInterval: spdf, target: self, selector: #selector(traceFileReader), userInfo: nil, repeats: true)
         } else {
           // if it doesn't exist, we're tracking the time held in the

  // are read from the file in ms
  // If the speed is not specified, the framework will use the timestamp
  // values found in the trace file to determine when to send the next message
  open func enableTraceFileSource(_ filename:NSString, speed:NSInteger?=nil) -> Bool {
    
    // only allow a reasonable range of values for speed, not too fast or slow
    if speed != nil {
      if speed < 50 || speed > 1000 {return false}
    }
    
    // check for file sharing in the bundle

import CoreBluetooth
import ProtocolBuffers


// public enum VehicleManagerStatusMessage
// values reported to managerCallback if defined
