Resistive switching mechanisms on TaOx and SrRuO3 thin film surfaces probed by scanning tunneling microscopy