Pipeline integrity and corrosion control