Added printing of stack trace upon exception.