Minor fix log function