Add exit code, fix #190