I have added a $sfstate identifier that is usable immediately after $sfile() and returns "cancel", "error", or $null. This will be in the next version.