Load the batch file in the function instead of loading global scope.