Complete state file system rewrite, now files are appended and data are saved into multiple files