stop gcode generation on error

fix #42

assert z_step_size is a positive value