added stream definition existance check