Add critical section to Flush so that only one 'instance' is actively flushing the store; Add more tests