Greetings Ishers. Digging over the garden today i found a stash of potatos that I mised earlier in the season... they looked fine so decided to prep. them and squeeze a boiling out. 90% of them were fine.... but, inside one I found about 7 or 8 red banded worm things that were between 1 and 2 inches long (OH says they were worms but I think they looked more ike maggots).
I didnt have time to take a picture as we were too grossed out by them and OH poured boiling water over them

Just wondering if anyone has any ideas what they might have been and how to stop them in the future.
The rest of the potato was fine and still edible too.