Fix logging to use log method.