Added printing of stack on try-catch