Only unlink the target file if we fail to open it with O_TRUNC set.