Don't try to close invalid files.