Write Text File: Value cannot be null. Parameter name: source

i did it this way but i’m still getting the e