sdm: Close current file stream.

- Close currently opened file stream before reusing fstream object
  to open a new file. fstream open() fails if stream is already
  associated with a file, object continues to point to current stream,
  and a call to is_open() returns success.

Change-Id: I54850cc6a4879b5d4ea7b17fb3f847fded7c8dcd
CRs-Fixed: 1029997
1 file changed