make flush interval configurable