updating file with some JS