CMakefile fix and exit confirmation added