Flush metadata after data files are written.