/**
 * Show msg (toast or dialog)
 */
function showMsg(text, type='silent') {

  Logger.log(text);
  
  const ss = SpreadsheetApp;

  if (type == 'dialog') {
    ss.getUi().alert(text);
  } else {
    ss.getActiveSpreadsheet().toast(text, 'Status', 60);
  }
}