fix crash when saving local saves (fclose called twice)