private void sendNextFileRequest() throws FileNotFoundException {
		if (fileList.length <= index) {
			logger.info("finish requesting all the files");
			channel.close();
			ChannelBuffer content;
			content = ChannelBuffers.copiedBuffer("Migrate Success!",
						CharsetUtil.UTF_8);
			HttpResponse res = new DefaultHttpResponse(HTTP_1_1, OK);
			res.setHeader(CONTENT_TYPE, "text/html; charset=UTF-8");
			setContentLength(res, content.readableBytes());
			res.setContent(content);
			sendHttpResponse(ctx, req, res);
			return;
		}
		if (fileList[index].length() > 1) {
			// String path = dirpath + File.separator + fileList[index];
			String path = fileList[index];
			path = path.substring(srcDir.lastIndexOf("/") + 1);
			path = destDir + path;
			path = path.replace("/", File.separator);
			downloadFile = createDirAndFile(path);
			sendRequest(host, "/" + fileList[index++]);
		} else
			sendNextFileRequest();
	}