moved remeasure logic after gcode edit to separate thread