Flush after set; This also fixes file corruption issues