before changing structure
a working version!
before optimize fileserver writing