This script logs two events to the same file. AI used "w" for both
writes, so the second open wipes the first line. Fix the mode on
line 5 so both lines end up in the file. The output should be:
started
done
The break is on line 5 — but read the whole snippet first.