merge defer funcs in sapi.start
add static action support, only for test