Enabling / disabling writing data to a file using a dashboard switch node

Didnt your other thread solve this?