Improve error handle during download block chain and logging.