clset up write to file