public static boolean fileprocess(String downloadpath, String filepath, String []paras, String sn){

			int errorcode=0;// print error code in the final output file;
			int errornum=17; // feature number
			String result="";

			File downloadfile_r = new File(downloadpath+"\\emmc_test.txt");
			File outputfile = new File(filepath);	

			try {
				String line="";
				ArrayList<String> content_r = new ArrayList<String>();
				BufferedReader br_r = new BufferedReader(new FileReader(downloadfile_r));
				while ((line=br_r.readLine())!=null){
					content_r.add(line);
				}				
				br_r.close();				
				downloadfile_r.delete();
				
				
				
				if (content_r.size()==paras.length){
					if (content_r.get(0).equals(paras[0])){
						result = "PASS";
					}
					else {
						result = "FAILED";
						errorcode = 2;
					}
				}
				else {
					result = "FAILED";
					errorcode = 1;
				}
				

			} catch (IOException e) {
				result = "FAILED";
				errorcode = 0;
			}
				
			
			
			try {
				BufferedWriter bw = new BufferedWriter(new FileWriter(outputfile,true));
				bw.write("RW_EMMC_Result="+result+"\r\n");
				System.out.println("RW_EMMC_Result="+result);
				if (result.equals("FAILED")){
					NumberFormat nf = NumberFormat.getIntegerInstance();
					nf.setMinimumIntegerDigits(2);
					bw.write("Error_Code= "+nf.format(errornum)+nf.format(errorcode)+"\r\n");
				}
				bw.flush();
				bw.close();
			}catch (Exception e){
				e.printStackTrace();
			}
			return true;
		}