Check for err.stack in logErr in wrapAsync

`err` has already true value at that point, so we probably want to check if there is `err.stack` available. Otherwise code can be simplified in another way.