Fix whitespace, add logging.