Improve error output in core