add debug logs for both addEvent and upload