fixed the test to read a little better

use a subshell to test the grep for DEBUG.