Changed "diagram" to "document" in user messages in order to make it
consistent.