Raise error if locations list has the wrong length
Merge pull request #418 from marianitadn/log-location-error

Raise error if the locations list has the wrong length