log module added. batch samples impoved.