add exit code while errors