format stack traces