move replacement of css and js path up