forked from rook/rook
using defer for closing file which are open for writing is not safe. so closing file again following below steps: 1. open files 2. defer file.close() 3. write 4.file.close() these will make sure files are closed. Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>