Properly closing streams in AppendStream and not throwing in seeks