fixed up a spec and tweaked the error handling
added server logging for errors