Better stack trace handling