I've been having this problem with my printer where at random times, it will move in the X or y axis and return to the print. It only happens when I print from an SD card and the error will occur in different places with the same g code file. I'm running a sain smart 2 in 1 with reprap discount full graphics screen.

https://goo.gl/photos/M8xeLcAggmAT25y18