Thread safe HaveFreeWritingSlots().
Don't exit Run if client read fails.
Remove obsolete function.
Fix bug in task size for first undowloaded file block.