Secondary ion mass spectrometry and X-ray photoelectron spectroscopy studies on TiO2 and nitrogen doped TiO2 thin films