Modifications to support async gcode loading

Also has fix for correct line number reporting.