@Phaedrux yes, the problem is resume print after powerloss. The gcode for lifting z axis make the gap between the previous layer and the current layer, maybe cause by under extrusion (leaking filament when heating nozzle and move from home to previous location). My solution is insert the code calling a macro before resume print (after heating nozzle already) instead hard code like the exist firmware setup. I can modify the movement of print head or extrusion before print is resumed. The resurrect-prolog.g is not used by me now, but I will change the location of calling code of resurrect-prolog.g in resurrect.g for my problem. So the new macro will nolonger nessessary.