added floodrate control to QueryWriter.java