Fix M codes
add debugging dump for gcode