don't log doc contents if file is unchanged.

Smaller version of previous pull req.