Added warnings and errors when sourceDocumentName is used

Output warning when a sourceDocumentName was given and output error when sourceDocumentName and sourceDocumentNames are given.

Thanks to @sclassen for his help.