Sdk enhancements

@antonbk @shunchu beat this up. I have braced myself. ;)
Check that stack trace is available and has appropriate size, otherwise there will be cases when we will crash inside of logger and logger should never crash.