Adding debug statements to see if entity is being JSONified.