public java.io.File generateHlsPlaylistFileWithCorrectPaths(File segmentFile) {
			if (!creatingDashAndHlsRenders) {
				return null;
			}
			java.io.File destinationPlaylistFile = new java.io.File(FileHelper.format(outputFile.getParentFile().getAbsolutePath()+"/"+outputFile.getName()+"_hls_updated.mpd"));
			java.io.File sourcePlaylistFile = getHlsPlaylistFile();
			
			if (!sourcePlaylistFile.exists()) {
				throw(new RuntimeException("Could not find source hls playlist file."));
			}
			
			if (destinationPlaylistFile.exists()) {
				if (!destinationPlaylistFile.delete()) {
					logger.error("Unable to delete existing generated hls playlist file.");
					return null;
				}
			}
			
			// scan through the source file and replace any instances of the path with the new one
			try(
				// these resources will be automatically closed
				BufferedReader br = new BufferedReader(new FileReader(sourcePlaylistFile));
				FileOutputStream fos = new FileOutputStream(destinationPlaylistFile);
				BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(fos));
			) {
			    for(String line; (line = br.readLine()) != null; ) {
			    	if (line.length() > 0) {
			    		if (line.charAt(0) == '#') {
			    			// just copy line to output as is
			    			bw.write(line);
							bw.newLine();
			    		}
			    		else {
			    			// line isn't empty and therefore can assume is the file path
			    			// write the new file path
			    			bw.write(""+segmentFile.getId());
							bw.newLine();
			    		}
			    	}
			    }
			} catch (IOException e) {
				logger.error("Error generating hls playlist file.");
				return null;
			}
			return destinationPlaylistFile;
		}