fflush with exclusive lock.  Fix versioning bug.