Error checking and fmt->format