adding stacktrace printing