added assert msg to extract_hist_ranges()
joined two message lines to one
Merge pull request #2966 from joonro/history-extract-assert-msg

Added assert msg to extract_hist_ranges()