Why the `hasattr` check? When would `window` not have the `project_file_name` method? As far as I can tell it's been there since the beginning in ST3.