added logging to debug complete_upload