Process monitoring using UV-VIS spectroscopy