included perc mean calculation over samples
bugfix: perc mean is now also selectable via parameter use_mean
add debug output