update pieces assignment algorithm
remove the peer if it is dead
add error msg construct func and handle the job after download finished