added debug messages for doCmd()