`is.is_open()` should be called if the file is not checked before.