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 = 12;
			String result="";

			File downloadfile = new File(downloadpath+"\\rw_eeprom_test.txt");
			File outputfile = new File(filepath);
			
			String line="";
			ArrayList <String> content = new ArrayList<String>();

			try {
				
				
				BufferedReader br = new BufferedReader(new FileReader(downloadfile));
				while ((line=br.readLine())!=null){
					content.add(line);
				}
				br.close();
				
				downloadfile.delete();			
				
				
				if (content.get(0).equals("0x0201")){
					result = "PASS";
				}
				else if (content.get(0).equals("0xffff")){
					result = "FAILED";
					errorcode=2;
				}

				

			} catch (IOException e) {
				e.printStackTrace();			
			}
				catch (NumberFormatException ex){
					result = "FAILED";
					errorcode = 0;
				}
			catch (IndexOutOfBoundsException e){
				result="FAILED";
				errorcode=1;
			}
			
			
			try {
				BufferedWriter bw = new BufferedWriter(new FileWriter(outputfile,true));
				bw.write("RW_EEPROM_Result="+result+"\r\n");
				System.out.println("RW_EEPROM_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");
					System.out.println("Error_Code="+nf.format(errornum)+nf.format(errorcode));
				}
				bw.flush();
				bw.close();
			}catch (Exception e){
				e.printStackTrace();
			}

			return true;
		}