In situ investigations of the metal-compound semiconductor interaction by mass spectrometry and electrical resistance measurements