update path and type of the JS file