Clarify documentation for scan_poptok
Fix incorrect documentation of error function