define before-saving signal to Buffer
run lua code in separate goroutine