added on error exit code. \nFixed echo with sudo bug