added print stack trace