Nanoscale properties of molecular and oxide based thin film devices measured by SPM