Fix: don't truncate the file before we read the content.