catch return code