Changed error return codes to be in line with the advanced bash scripting recommendations of 64-113