updating logging of exceptions, if checks and if coding style