public static void deletePathQuietly(String toDelete) {
        try {
            Path toRemovePath = new Path(toDelete);
            FileSystem fs = toRemovePath.getFileSystem();
            if (fs.exists(toRemovePath)) {
                fs.delete(toRemovePath, true);
            }
        } catch (IOException e) {
            LOG.error("Failed to delete files for {} ", toDelete, e);
        }
    }
@Test
    void testDeletePathQuietly() throws IOException {
        File testFile = new File(tempFolder.getPath(), "testFile");
        Files.createFile(testFile.toPath());
        assertThat(testFile).exists();
        SegmentPartitionFile.deletePathQuietly(testFile.getPath());
        assertThat(testFile).doesNotExist();
    }