Flushing to prevent corruption