adding chuncked mode for file transfer