Make error messages more helpful for debugging.