Modify gcode callback so preamble is written.