Adapt to some new conditions in code

* HEAD requests, anonymous calls
* print file and line information for missing code errors