MOBILE-427 Refactor handleExternalFiles