Declare prevCtrlMode in krl script