fix: avoid confusing `temp file is written to` in log
If file write operation was not successful, this line is misleading. Put a line in log after file is written, not before.
If file write operation was not successful, this line is misleading. Put a line in log after file is written, not before.