Fixing a couple cases of a programming error where a file is not closed in case of an exception, which was causing resource leak warnings in some cases when encountering a kconfig error. Signed-off-by: Declan Snyder <declan.snyder@nxp.com>