working on segment file storage