created generic function to handle update css and js files