Fix bug of cancel receiving file function.