change non-function returns to exit for posix shell compliance