Fix error throwing, more verbose error logging, fix one test