Close the created file.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>