You did the right thing at the time
, but all I would say is that it's a good idea to think about "Plan B" on the ground at the planning stage, rather than in the air.
Sometimes it's best to make "Plan A" a dogleg around stuff in the first place, then on the day, if possible, "Plan B" cuts the corner and saves time and fuel.
Same with very high ground, if you're unsure about the weather, plan to route round then if the weather is good enough, cut the dogleg out and fly direct.