         }
     }
 
+    private func extractDiagnostics(simulators: [FBSimulator]) throws {
+        for simulator in simulators {
+            guard let diagnostics = simulator.diagnostics.launchedProcessLogs().first(where: { $0.0.processName == application.name })?.value else { continue }
+            guard let logFilePath = diagnostics.asPath else { return }
+            let destinationPath = outputURL(simulatorConfiguration: simulator.configuration!).appendingPathComponent("\(application.name).log").path
+            try FileManager.default.copyItem(atPath: logFilePath, toPath: destinationPath)
+        }
+    }
+
+    private func outputURL(simulatorConfiguration: FBSimulatorConfiguration) -> URL {
+        return configuration.output.appendingPathComponent(identifier(simulatorConfiguration: simulatorConfiguration))
+    }
+
+    private func identifier(simulatorConfiguration: FBSimulatorConfiguration) -> String {
+        return "\(simulatorConfiguration.deviceName) - \(simulatorConfiguration.osVersionString)"
+    }
+
 }


        try boot(simulators: simulators)
        try test(simulators: simulators)

        ConsoleReporter.writeSummary()



        try fileManager.createDirectory(at: configuration.output, withIntermediateDirectories: true, attributes: nil)
        fileManager.createFile(atPath: logFileURL.path, contents: nil, attributes: nil)

        for simulatorConfiguration in configuration.simulators {
            try fileManager.createDirectory(at: outputURL(simulatorConfiguration: simulatorConfiguration), withIntermediateDirectories: true, attributes: nil)
        }
    }

    private func boot(simulators: [FBSimulator]) throws {
