Updates text file