Optical spectroscopy and spectroscopic ellipsometry as a monitor for thin film growth by dc magnetron sputtering