small addition of an exception for no document found