added insertPiece method for assembly of the file to be downloaded