docs: protected static String addFileNameToTargetPath(String sourcePath, String targetPath) {
          if (targetPath.endsWith("/")) {
              String filename = Paths.get(sourcePath).getFileName().toString();
              return targetPath + filename;
          }
          return targetPath;
      }