Adding worley debug code