private async void GenerateOutputFile(string sourceCode) { try { var entryPointDirectory = Path.GetDirectoryName(ScriptInfo.EntryPoint); var outputPath = Path.Combine(entryPointDirectory, ScriptName + ".txt"); await FileUtil.WriteTextAsync(outputPath, sourceCode); if (GenerateExtensionScript) { _scriptService.CreateExtensionScript(outputPath, sourceCode); } } catch (IOException) { _dialogService.ShowInfoDialog("Don't spam the button"); } }