Changes to directive to handle resource file reloading