Added debug messages for testing.