added 500/404 error messaging, and HEAD request support for curling