private static List<String> readLinesAndDeleteFile(File file) throws IOException {
    try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8))) {
      List<String> lines = new ArrayList<>();
      String line;
      while ((line = reader.readLine()) != null) lines.add(line);
      return lines;
    }
    finally {
      file.delete();
    }
  }
private static List<String> readLinesAndDeleteFile(File file)