Added assert msg to extract_hist_ranges()

Added informative message to the ``assert endsess >= startsess`` in ``extract_hist_ranges()``