try (
FileOutputStream fout = new FileOutputStream(filepath);
ObjectOutputStream oos = new ObjectOutputStream(fout)
) {
oos.writeObject(item);
}
FileOutputStream fos = new FileOutputStream("t.tmp");
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject("Today");
oos.close();