Derailments did not effect the veto at all….
Check it out;

In the days leading up to President Obama’s veto of the Keystone XL pipeline, 14 oil tanker railroad cars derailed in West Virginia and exploded in a fiery environmental disaster.

It was reported that residents in the area compared the thunderous fireball and poisonous smoke that blackened the sky to “a scene from the apocalypse” — describing it as “something biblical, or wrath-of-God type stuff.”

At last count, there were more than 141 rail tanker accidents in 2014 alone, close to a sixfold increase in the average number of spills between 1975 and 2012.

Obama was briefed on all of this and presumably knew that the dangers of transporting highly flammable oil by rail far outweighed the possibility of such accidents happening in the XL pipeline.