Add the exit system call in the procedure of showing error messages