Preferred orientation of TiN films studied by a real time synchrotron x-ray scattering