Added debug messages for loading events.