add a path check for the certfile to detect basic errors

Also fixes a variable with incorrect case