public static void Check (String raw, String filename)
	{
		try {
			FileConnection conn = (FileConnection)Connector.open(logFileName(filename),Connector.READ_WRITE); 
            InputStream stream = conn.openInputStream();
            LineReader lineReader = new LineReader(stream);
            String line = new String(lineReader.readLine());
            while(!line.equals("EOF"))
            {
           	//compare
           	 if(line.equals(raw))
            		{
           		 Helpers.alertMsg("SMS sent twice!");
           		 //write to log file
           		 Write(line.toString(), "result");
           		 break;
            		}		
           	 else 
             		{ 
           		 line = new String(lineReader.readLine());
             		}
            }
            stream.close();
            stream = null;
            } 
		catch(IOException e) {}
	}