load resource file dynamically