onBeforeStart callback added