Changed from open to is_open to avoid confusion with open()