cleanup old output before executing cmd