added time out for flushing operation