IMproved logging logic to allow full tracing of g code exchange