Added resume for pauseOnError
Added pauseOnError and exitOnError