Fix mode and theme file link generation