Exception: Cannot call SpreadsheetApp.getUi() from this context. (line 114).
And turns cell black