fixing addScript method
better file updating