Add missing log and pointer reset code
- Issue:
In some condition, the file pointer did not closed and made a memory
leakage.
- Solution:
In previous patch, a log for checking error status was missed. So, the
behavior of the code was not predictable. Thus, this patch restores the
log and also adds pointer reset code in order to prevent memory leakage.
Through this patch, the code will work as intented.
Change-Id: Id2524f579bd68e0f757910dbdf93e482dc402755
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>