Use a try..catch in etorrent_fs:read_pieces_and_assemble/3.