made location required and errors work properly

Fixes #47