def METHOD_NAME(self, path):
    if not os.path.exists(path):
        inkex.errormsg(_("File not found."))
        sys.exit(1)
    if os.path.isdir(path):
        inkex.errormsg(_("The filepath specified is not a file but a dictionary.\nPlease choose a threadlist file to import."))
        sys.exit(1)