Add function to read gcode.