log, check if sort is total_cost