Using some debug output to try figure out what is happening