Restarted scripting using C++ - Simple command line application