Update function will modify the file on filesystem