In-situ Optical Control and Stabilization of the Curing Process of POLICRYPS Gratings