Blackbox optim: customize stopping rule

Hi, I am using “bboptimize” in Julia for minimization. I tried to change the tolerance rule by setting FitnessTol=tol,

result = bboptimize(funcblackbox;
        MaxSteps = maxiter,
        FitnessTol=tol)

The problem I have is the algorithm never converges. I tried to let tol=Inf but the algorithm still keeps running until the maxiter.

I also tried to set up my own stopping rule: I only need the “percentage” change between two iterations to be small enough, there is what I did

last_fitness = Ref(Inf)
    custom_stop_condition = (state) -> begin
        current_fitness = best_fitness(state)
        percent_change = abs(current_fitness - last_fitness[]) / abs(last_fitness[])
        println("Iteration ", BlackBoxOptim.iteration(state),
                ": Best fitness = ", current_fitness,
                ", Percent change = ", percent_change * 100, "%")
        last_fitness[] = current_fitness
        return percent_change < percent_tolerance
    end

    result = bboptimize(func_blackbox;
                        MaxSteps = maxiter,
                        StopFunction = custom_stop_condition)

This does not work either. Does anyone know how to change the tolerance or set up our own stopping rule?