     var subDirectory = testSummariesPlistJsons.count > 1 ? "\(fileCount)" : ""
 
     testSummariesPlistJsons.forEach { testSummariesPlistJson in
-    saveLastScreenshots(testSummariesPlistJson: testSummariesPlistJson, logsTestPath: logsTestPath, lastScreenshotsPath: appendSubdirectoryToPath(screenshotsPathOptionValue, subDirectory: subDirectory), screenshotsCount: screenshotsCount, excludeIdenticalScreenshots: excludeIdenticalScreenshots)
+    saveLastScreenshots(testSummariesPlistJson: testSummariesPlistJson, logsTestPath: logsTestPath, lastScreenshotsPath: appendSubdirectoryToPath(screenshotsPathOptionValue, subDirectory: subDirectory)!, screenshotsCount: screenshotsCount, excludeIdenticalScreenshots: excludeIdenticalScreenshots)
         fileCount += 1
         subDirectory = "\(fileCount)"
     }

/// - Parameter path: String representing target directory
/// - Parameter subDirectory: String representing the subdirectory you wish to append to path
/// - Returns: The new subdirectory path under the original path
func appendSubdirectoryToPath(_ path: String, subDirectory: String) -> String {
    if subDirectory.isEmpty {
        return path
    }

    var subDirectory = testSummariesPlistJsons.count > 1 ? "\(fileCount)" : ""

    testSummariesPlistJsons.forEach { testSummariesPlistJson in
        generateJUnitReport(testSummariesPlistJson: testSummariesPlistJson, logsTestPath: logsTestPath, jUnitRepPath: appendSubdirectoryToPath(path, subDirectory: subDirectory)! + fileName, noCrashLogs: noCrashLogs, lastScreenshotsPath: appendSubdirectoryToPath(screenshotsPathOptionValue, subDirectory: subDirectory), screenshotsCount: screenshotsCount, buildUrl: buildUrlOptionValue, workspacePath: workspacePathOptionValue ?? "")
        fileCount += 1
        subDirectory = "\(fileCount)"
    }
