Removed unused variable result from test of filewriter as its a test that the correct exeception is thrown