with Write file Function