Database import check if document exists