Bug Fix:flush not yet saved data before a read outside buffer