Properly break out of loop and add debugging

Break out of loop to fix a crash. Print coordinates of the ship to debug
program.