Starting to add debug code