Check if document was unpublished before opening it.