write right file in