fix memory leak if root cert file is not found