collector: Add missing error checking