callbacks to ensure all files have uploaded before it is flushed.