delete stream object when returning false