Added debug statements for testing.