public String processInput(String inputLine) {

    	if (inputLine == null) {
    		return null;
    	}

        if (state == WAITING) {
        	try {
				writer = new PrintWriter("/tmp/testlogfile45_" + suffix, "UTF-8");
			} catch (FileNotFoundException e2) {
				System.out.println("File not found, creating");
			} catch (UnsupportedEncodingException e2) {
				e2.printStackTrace();
			}
        	if (writer == null) {
				System.out.println("Could not create file, Exiting");
        		return null;
        	}
        	grep = new GrepProtocol();
        	state = PROCESS;
        	return "None__here";
        } else if (state == PROCESS) {
        	if (inputLine.equals("DONE_FILE_TRANSFER")) {
	        	state = GREP;
	        	writer.close();
	        } else {
            	writer.println(inputLine);
	        }
        	return "None__here";
        } else if (state == GREP) {
			while ((temp = grep.processInput(inputLine, "/tmp/testlogfile45_" + suffix)) != null) {
				cmdOut +=  temp + "\n";
			}
				state = DONE;
			    return cmdOut;
        }
        return null;
    }