Close stream after read