don't crash on IOError
Merge branch 'fix-close' into fixes