mock the FileWriter close to store the contents in the
desired_file_content; so it can be read afterwards
rename run to test
Make sure any existing references are closed when creeating new one with
same name and that content is not updated on close after previous cancel
or close.