docs: public void createAndOpenUntitledDb() throws ClassNotFoundException, Exception {
  
  		getDb().close(false, session.isCleanUpRequired());
  
  		// delete all untitled session db in "session" directory
  		File dir = new File(getSession().getSessionFolder());
  		File[] listFile = dir.listFiles(new FilenameFilter() {
  			@Override
  			public boolean accept(File dir1, String fileName) {
  				if (fileName.startsWith("untitled")) {
  					return true;
  				}
  				return false;
  			}
  		});
  		for (int i = 0; i < listFile.length; i++) {
  			if (!listFile[i].delete()) {
  				// ZAP: Log failure to delete file
  				logger.error("Failed to delete file " + listFile[i].getAbsolutePath());
  			}
  		}
  
  		// ZAP: Check if files exist.
  		// copy and create new template db
  		currentDBNameUntitled = DBNAME_UNTITLED + DBNAME_COPY;
  		FileCopier copier = new FileCopier();
  		File fileIn = new File(Constant.getZapInstall(), DBNAME_TEMPLATE + ".data");
  		if (fileIn.exists()) {
  			File fileOut = new File(currentDBNameUntitled + ".data");
  			if (fileOut.exists() && !fileOut.delete()) {
  				// ZAP: Log failure to delete file
  				logger.error("Failed to delete file " + fileOut.getAbsolutePath());
  			}
  
  			copier.copy(fileIn, fileOut);
  		}
  
  		fileIn = new File(Constant.getZapInstall(), DBNAME_TEMPLATE + ".properties");
  		if (fileIn.exists()) {
  			File fileOut = new File(currentDBNameUntitled + ".properties");
  			if (fileOut.exists() && !fileOut.delete()) {
  				// ZAP: Log failure to delete file
  				logger.error("Failed to delete file " + fileOut.getAbsolutePath());
  			}
  
  			copier.copy(fileIn, fileOut);
  		}
  
  		fileIn = new File(Constant.getZapInstall(), DBNAME_TEMPLATE + ".script");
  		if (fileIn.exists()) {
  			File fileOut = new File(currentDBNameUntitled + ".script");
  			if (fileOut.exists() && !fileOut.delete()) {
  				// ZAP: Log failure to delete file
  				logger.error("Failed to delete file " + fileOut.getAbsolutePath());
  			}
  
  			copier.copy(fileIn, fileOut);
  		} else {
  			String fallbackResource = "/org/zaproxy/zap/resources/zapdb.script";
  			try (InputStream is = Model.class.getResourceAsStream(fallbackResource)) {
  				if (is == null) {
  					throw new FileNotFoundException("Bundled resource not found: " + fallbackResource);
  				}
  				Files.copy(is, Paths.get(currentDBNameUntitled + ".script"));
  			}
  		}
  
  		fileIn = new File(currentDBNameUntitled + ".backup");
  		if (fileIn.exists()) {
  			if (!fileIn.delete()) {
  				// ZAP: Log failure to delete file
  				logger.error("Failed to delete file " + fileIn.getAbsolutePath());
  			}
  		}
  
  		// ZAP: Handle the "lobs" file.
  		fileIn = new File(currentDBNameUntitled + ".lobs");
  		if (fileIn.exists()) {
  			if (!fileIn.delete()) {
  				logger.error("Failed to delete file " + fileIn.getAbsolutePath());
  			}
  		}
  
  		getDb().open(currentDBNameUntitled);
  		DBNAME_COPY++;
  	}