if (!lf.lock())
throw die(MessageFormat.format(CLIText.get().cannotLock, output));
try {
OutputStream os = lf.getOutputStream();
try {
log.writeTo(os);
} finally {
os.close();
}
if (!lf.commit())
throw die(MessageFormat.format(CLIText.get().cannotWrite, output));