I am getting an error unhandled exception in script when running .exe 