Oil swings to loss after U.S. pipeline outage boosts volatility