added stack trace to looging and class based flag