Saves results in a js file