More debugging support and run the benchmarky test with a real cost function