Fix debug message
Connect and use sfprov_*
Fix "comparison of unsigned expression >= 0"
Fix possible use before initialization