Added some conditional debug messages