Add FileStateFactory and change default to JSON.