Added a pause

Added a pause, before an error message was printed before closing
program.