improve handling of corrupted documents in update operation; remove useless line ending in log messages