Correct a compilation error and use logging.