Added write to file.