private static void renameAndTrimBackups() {
		File directory = new File(DatabaseWrapper.storagePath + "Backup/");
		ArrayList<Path> paths = new ArrayList<>();
		if (!directory.exists()) {
			try {
				Files.createDirectory(directory.toPath());
			} catch (IOException ex) {
				Logger.getLogger(AwanaDatabase.class.getName()).log(Level.SEVERE, null, ex);
			}
		} else {
			try {
				DirectoryStream<Path> stream = Files.newDirectoryStream(FileSystems.getDefault().getPath(DatabaseWrapper.storagePath + "Backup/"), "*.back");
				for (Path p : stream) {
					paths.add(p);
					Logger.getGlobal().log(Level.INFO, p.toString());
				}
				stream.close();

				if (!paths.isEmpty()) {
					for (int i = paths.size(); i > 0; i--) {
						File file = paths.get(i - 1).toFile();
						System.out.println(file.getPath());
						if (i >= backupCutoff) {
							file.delete();
						} else {
							File FileR = FileSystems.getDefault().getPath(file.getPath().substring(0, file.getPath().lastIndexOf("db") + 3).concat(i + ".back")).toFile();
							file.renameTo(FileR);
						}
					}
				}
			} catch (IOException ex) {
				Logger.getGlobal().log(Level.SEVERE, null, ex);
			}
		}
	}