Add call to `close()` to match `open()` introduced in 4799eab