Some debug code added to make the output file clearer