[TO_STAGE]fix process running check to use proper return code check