Working on bug fixes
Fixed bug created when putting exit statements after perror.