Filament Leaking During Automatic Bed Leveling Before the print has actually started I have set up Auto Bed Leveling using a BLTouch sensor, during the period that this runs I find that material leaks out of the nozzle and curls back onto itself and by the time it finishes it is substantial enough to cause problems when the nozzle is primed  drawing the line to the left of the print. The material that leaks out catches on the material extruded to prime the nozzle, before printing the model so when the first line of the model are extruded to very quickly pulls up off the bed and becomes a massive tangle of material.

I try to catch it my self using various thin instruments to scrape it off the nozzle as it starts the priming but this isn't always successful and is far from ideal. I have also tried adding a retraction before the bed levelling starts suing the gcode commands added to the beginning of every print, at the moment however I find that a retraction large enough to stop the leaking material also means that material doesn't come out for the priming in time so the first lines of the print don't work.

The gcode at the beginning of the print is as follows:

; Ender 3 Custom Start G-code
M104 S{material_print_temperature_layer_0} ; Set Extruder temperature
M140 S{material_bed_temperature_layer_0} ; Set Heat Bed temperature
M190 S{material_bed_temperature_layer_0} ; Wait for Heat Bed temperature
M109 S{material_print_temperature_layer_0} ; Wait for Extruder temperature
G28 ; Home all axes
G1 F1800 E-3 ; Retract filament 3 mm to prevent oozing
G29 ; BLTOUCH Mesh Generation
G92 E0 ; Reset Extruder
G1 Z5.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
G92 E0 ; Reset Extruder
G1 Z5.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed


I am using an Ender 3 running Marlin 1.1.9 with BlTouch Auto Leveling, With slicing done by CURA 3.5.6

Any suggestions you have that would help to stop this would be greatly appreciated.
The oozing is due to hot-end getting hot before the bed leveling procedure: if you move the hot-end warm up command after the G29 line you avoid that oozing

; Ender 3 Custom Start G-code
M104 S{material_print_temperature_layer_0} ; Set Extruder temperature
M140 S{material_bed_temperature_layer_0} ; Set Heat Bed temperature
G28 ; Home all axes
G29 ; BLTOUCH Mesh Generation
M190 S{material_bed_temperature_layer_0} ; Wait for Heat Bed temperature
M109 S{material_print_temperature_layer_0} ; Wait for Extruder temperature
G1 F1800 E-3 ; Retract filament 3 mm to prevent oozing
G92 E0 ; Reset Extruder
G1 Z5.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
G92 E0 ; Reset Extruder
G1 Z5.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed


The above code will activate the heating elements but starts homing and leveling procedure without waiting for the elements to get up to temperature. Only after the bed leveling is finished the printer will pause and wait for the heating elements reach the desired temperature.

This will prevent oozing on a cold start, but you will still be affected if you start a print right after another print, when the hot-end is still close to  melting temperature.

If you prefer to avoid that condition you might want to also move the M104 and M140 commands after the G29 bed leveling command.