Fix throwing exceptions.
Use logger.