Earlier today, I was gathering an Orrian Sapling which should yield Ancient Wood Logs, the highest tier wood. At the time I was gathering it I was being attacked by 2 risens. I got two ruined logs which typically occur when you use a lower tier logging axe. I immediately stopped gathering. I typically have one mithril and one orichalcum gathering tool of each type. I would switch accordingly when I gathered (to save on costs). I had originally thought I had the wrong logging axe equipped. So I killed the two risen and went to my inventory to equip my Orichalcum logging axe, only to find that it was already equipped. I used the logging axe again to gather the last piece of Ancient Wood Log which did work.
I know that I have successfully gathering material in the past while being attacked by the mob.
So my question is, does having the mob attack you while you are gathering sometimes cause you to fail at gathering. Or is there a small random chance of you failing to gather a material regardless if you have the correct tier or higher gathering tool?