Be aware, I have chased my tail for 2 days trying to sort out a problem on my Mega X printer, changed settings, filaments, you name it I tried it, today out of frustration I purchased a new SD Card, loaded my model surprise surprise it worked.
So before tearing you hair out try a new SD code some how the GCode gets screwed up