kill tail before deleting file