         }
         
         // log error if invalid bucketing id
-        logger?.log(level: .error, message: String(format:"Invalid bucketing value for experiment %@", experiment.key))
+        logger?.log(level: .error, message: "Invalid bucketing value for experiment \(experiment.key)")
 
         return nil;
 

                }
                else {
                    // log problem with experiment id
                    logger?.log(level: .error, message: String(format:"Experiment Id %@ for experiment not in datafile", experimentId))
                }
                return experiment;
            }
        }
        
        // log error if invalid bucketing id
        logger?.log(level: .error, message: String(format:"Bucketing value %d not in traffic allocation", bucketValue))

        return nil
    }

        }
        else {
            // log message if the user is mutually excluded
            logger?.log(level: .error, message: "User not bucketed into variation. Mutually excluded via group \(group?.id ?? "unknown")")

            return nil;
        }
