Added if .. then to not exit with an error.