Be more smart about how we update outfile so we won't share half a file.