added file append on the server side
removed encoding before sending the slice