check document references