added support for stringifying errors