add command to output only after it may have changed