This still occurs if e.g. xmlchange is interrupted during a write, which actually is pretty easy to do by accident, because xmlchange is slow. We may want to consider guarding against this somehow (the simplest solution is probably to write to a temporary file, then do an "mv" to atomically replace the old file with the new one).Of course if xmlchange is rewritten to write the file faster (currently it is slow due to XML::Lite?), we may have a lower chance of corruption simply due to there being a smaller window during which the I/O can be interrupted.