Print the search query when raising exception in _find_one