try {
payloadFile = File.createTempFile("payload", ".dat", (tempDirectory != null) ? new File(tempDirectory) : null);
payloadFile.deleteOnExit();
} catch (IOException e) {
try {
payloadFile = File.createTempFile("payload", ".dat", (tempDirectory != null) ? new File(tempDirectory) : null);
payloadFile.deleteOnExit();
} catch (IOException e) {