added rewriter debug to command.cpp