Close file before exiting get_value function.

Change-Id: Idb9f44c6a664bbfa398bc15f47888357144aec6e