Add logging messages on some try except blocks