(response => {
          if (!response.ok) {
            if (response.status === 404) {
              displayToastTop({
                type: 'error',
                string: 'Template file not found. The file may have been deleted or moved.'
              });
            } else {
              displayToastTop({type: 'error', string: 'Error downloading template: ' + response.statusText});
            }
            throw new Error('Network response was not ok');
          }
          return response.blob();
