Print stack trace for logged errors