if file is deleted then complete stream (but the implementation has bug....)