Made the end of gcode printing not throw and exception.