Ofgem , the industry regulator , used its powers to intervene and appoint British Gas as the supplier of last resort to keep the power flowing to E4B 's 40,000 customers after PriceWaterhouse Coopers failed to find a buyer to avoid the business going into administration .