Ti:LiNbO3 waveguides study by secondary ion mass spectrometry and near field method