private void logGeneration(Object o) throws IOException {
if (generationLog != null) {
boolean exists = FileCommands.exists(generationLog);
if (!exists)
FileCommands.createFile(generationLog);
ObjectOutputStream oos = exists ? new AppendableObjectOutputStream(new FileOutputStream(generationLog.getFile(), true))
: new ObjectOutputStream(new FileOutputStream(generationLog.getFile()));
try {
oos.writeObject(o);
} finally {
oos.close();