Refactor device profile loading to streamline variable assignment and improve GIT_TAG retrieval logic