Need to unwrap exception before checking for security exception
Merge pull request #816 from ratnikov/fix-logger-instantiation

Need to unwrap exception before checking for security exception