majorsilence/My-FyiReporting — pull request #59 by tsliang (2013-06-27 09:16:22+00:00)
Title: Place SaveFile writer in using block

The "finally" block in SaveFile() does not check to see if the streamwriter is null before attempting to close it. If the writer has not been instantiated for whatever reason, such as an
AccessDeniedException, the method throws an unhandled NullReferenceException. Placing the writer in a "using" block will make the code cleaner and automatically handle the aforementioned case.