Adds waitForPendingUploads