Vikram,
I have had a different and much more successful experience with engine failure.
One of my Twinstar engines (for people not familir, Twinstar engines are mounted on each wing), failed when my Twinstar was at maximum distance away from me while in Autonomous mode. The great news, was that MatrixPilot was still able to fly the Twinstar home around the waypoints route, on just one engine. The only result was that the Twinstar went passed the side of each waypoint rather than through the middle. I did not realise that the engine had failed until the Twinstar flew over the top of me on it's return from the Autonomous route. I then examined the logs afterewards to see how MatrixPilot had coped. It had done well.
That flight was a long time ago, and I may have had a different setup in my options.h for that flight.
By the way, I have had Twinstar2 planes for 3 years now. The stock brushed engines always fail eventually. The brushes go, even when you apply the correct capacitors across the main supply wires to reduce internal sparking. So I now convert my Twinstar to brushless engines, and these have not yet to be replaced. They are much more reliable (and incredibly powerful).
Best wishes, Pete