What's the issue?
When updating files, we quite often use utilities such as `os.WriteFile`, internally this will open the file with the 'O_TRUNC' flag, then write the given data. This opens ourselves to issues where truncation succeeds, but the write fails (meaning it's possible to end up with partial/empty files).
What's the fix?
For "mission critical" files, we should use atomic operations, for example when updating the plan.