Flush file to get data at once.