added flush to Util
do a fsync when flushing index