Controlling the nonlinear dynamics during the light-induced reorientation in nematic liquid-crystal films