presto-hive/src/main/java/io/prestosql/plugin/hive/SortingFileWriter.java/SortingFileWriter/cleanupFile
class SortingFileWriter:    private void cleanupFile(Path file)
    {
        try {
            fileSystem.delete(file, false);
            if (fileSystem.exists(file)) {
                throw new IOException("Delete failed");
            }
        }
        catch (IOException e) {
            log.warn(e, "Failed to delete temporary file: " + file);
        }
    }