log management script