Copied super method, and added logging.