Flush prior to close