fix missed change to response end regexp
make regexp var name more readable
add some basic debugging output