Do not close io ourselves, and only when closeable

Closes #11