Fix the return value from the checking function. Do not grab the hidden params second time
Fix the condition of the line-reading loop: stop if ret >= 2
Fix missing $deferrs update on failed check-submit