moved log method to util