Fix saving files state.