Changes related to refactoring exceptions and adding loggers