better support for errors