use log correctly