check if exec is a list before substituting %c