engine.mainMixerNode.installTap(onBus: 0, bufferSize: 4096, format: nil) {(buffer, time) in
do {
try outputFile.write(from: buffer);
} catch {
// We cannot re-throw here due to the signature of the block
print("Error: \(error)")
print("Description: \(error.localizedDescription)")
}
}