Ensure we dont block on closing streams
Add timeout to stream closing