added a small print before stack trace print