improved stack trace on errors