docs: private static void writeFile(final HttpQuery query,
                                  final String path,
                                  final byte[] contents) {
      try {
        final FileOutputStream out = new FileOutputStream(path);
        try {
          out.write(contents);
        } finally {
          out.close();
        }
      } catch (FileNotFoundException e) {
        logError(query, "Failed to create file " + path, e);
      } catch (IOException e) {
        logError(query, "Failed to write file " + path, e);
      }
    }