Another, more angry, test about tampering with the input.
Avoid exceptions by deleting the input file before rewriting it.