Added "exit" to the end of the generated script.