added support for captureStackTrace