Update Utils.writeToFile signature