Rewrite log management scripts