Sierra Club lawsuit costs ratepayers millions