added some logging calls as well as numberOfFilePieces