add exit code and friendly error manner